package com.gaoda.booksystem.entity;

import com.baomidou.mybatisplus.annotations.TableField;

import java.util.Date;

/**
 * @author: LuckyBear
 * @date: 2018-12-10 21:04
 * @description:
 */
public class Borrowing {
    private int id; //主键id
    private Date borrowingTime; //借书时间
    private String userNumber;  //借书人（用户）编号
    private String bookNumber;  //图书编号
    private String delflag; //是否归还图书

    @TableField(exist = false)
    private Book book;

    public Borrowing() {
    }
    public Borrowing(Date borrowingTime, String userNumber, String bookNumber) {
        this.borrowingTime = borrowingTime;
        this.userNumber = userNumber;
        this.bookNumber = bookNumber;
    }

    public Borrowing(Date borrowingTime, String userNumber, String bookNumber, String delflag,Book book) {
        this.borrowingTime = borrowingTime;
        this.userNumber = userNumber;
        this.bookNumber = bookNumber;
        this.delflag = delflag;
        this.book = book;
    }
    public Borrowing(Date borrowingTime, String userNumber, String bookNumber,Book book) {
        this.borrowingTime = borrowingTime;
        this.userNumber = userNumber;
        this.bookNumber = bookNumber;
        this.book = book;
    }

    public Borrowing(int id, Date borrowingTime, String userNumber, String bookNumber, String delflag,Book book) {
        this.id = id;
        this.borrowingTime = borrowingTime;
        this.userNumber = userNumber;
        this.bookNumber = bookNumber;
        this.delflag = delflag;
        this.book = book;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getBorrowingTime() {
        return borrowingTime;
    }

    public void setBorrowingTime(Date borrowingTime) {
        this.borrowingTime = borrowingTime;
    }

    public String getUserNumber() {
        return userNumber;
    }

    public void setUserNumber(String userNumber) {
        this.userNumber = userNumber;
    }

    public String getBookNumber() {
        return bookNumber;
    }

    public void setBookNumber(String bookNumber) {
        this.bookNumber = bookNumber;
    }

    public String getDelflag() {
        return delflag;
    }

    public void setDelflag(String delflag) {
        this.delflag = delflag;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    @Override
    public String toString() {
        return "Borrowing{" +
                "id=" + id +
                ", borrowingTime=" + borrowingTime +
                ", userNumber='" + userNumber + '\'' +
                ", bookNumber='" + bookNumber + '\'' +
                ", delflag='" + delflag + '\'' +
                ", book=" + book +
                '}';
    }
}
